<%@page import="java.util.ArrayList"%>
<%@page import="vo.mailVO"%>
<%@page import="dto.mailDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/mail.css">
<script src = '../js/mail.js'></script>
</head>
<body>
<jsp:useBean id="vo" class = 'vo.mailVO' scope='page'/>
<jsp:setProperty property="*" name="vo"/>
<%
	mailDTO dto = new mailDTO();
	ArrayList<mailVO> al = dto.list(vo);
	int a = vo.getEmail_number();
%>
<form name = 'hFrm' method='post'>
		<input type='hidden' name="nowPage" value="<%=dto.getNowPage()%>"/>
	 	<input type='hidden' name='m_id' value="<%=vo.getM_id()%>"/>
	 	<input type='hidden' name='email_number' value="<%=vo.getEmail_number()%>"/>
		<input type="hidden" name="email_list" value="<%=vo.getEmail_list()%>"/>
		<input type="hidden" name="email_address" value="<%=vo.getEmail_address()%>">
		<input type="hidden" name="email_pwd" value="<%=vo.getEmail_pwd()%>"/>
		<input type="hidden" name="e_name" value="<%=vo.getE_name()%>"/>
		<input type="hidden" name="email_contents" value="<%=vo.getEmail_contents()%>"/>
		<input type="hidden" name="email_sender" value="<%=vo.getEmail_sender()%>"/>		
</form>
<p>
<img alt="" src="../images/m_title_mail_view.png">
<hr>
	<div>
		<div align="left"  id = 'mail_list_title'>
			제&nbsp;&nbsp;목&nbsp;&nbsp;<font style="font-weight: bold;"><%= al.get(a).getEmail_subject() %></font>
			<BR>
			보낸 이&nbsp;<%=al.get(a).getEmail_sender() %>
			<BR>
			받은 이&nbsp;<%=al.get(a).getEmail_receiver()%>
			<br>
		</div>
		
		<div align="right">
			날&nbsp;&nbsp;짜&nbsp;&nbsp; <%=al.get(a).getEmail_date()%><br>
			크&nbsp;&nbsp;기&nbsp;&nbsp;<%=al.get(a).getEmail_size()%><br>
		
		</div>
		<%=al.get(a).getEmail_contents() %><br>

<hr>
	<div class = 'bottommenu'  align="left">
		<!-- <div><input type ="image" src="../images/"	value="답장쓰기" 		id="btnReply"></div> -->
		<div><input type ="image" src="../images/button_blue_delete.png" id="btnDelete"></div>
		<div><a href="#" onclick="goInput()"><input type ="image" src="../images/button_blue_write.png" value="새 메일쓰기" id="btnInput"></a></div>
		<div><a href="#" onclick="goList('<%=vo.getEmail_list()%>')">
			<input type ="image" src="../images/button_blue_list.png" 	value="목록으로" id="btnList"></a></div>
	</div>
</div>
</body>
<script>viewInit();</script>
</html>